package com.jic.member.mapper;
import com.jic.common.base.orm.BaseMapper;
import com.jic.member.entity.TripBranchNodeEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TripBranchNodeEntityMapper extends BaseMapper<TripBranchNodeEntity> {

    List<TripBranchNodeEntity> queryByBranchIds(@Param("branchIds") List<Long> branchIds);

    TripBranchNodeEntity queryStartNodeByTripId(@Param("tripId") Long tripId);

    List<TripBranchNodeEntity> queryChildByPrevId(@Param("id") Long id);

    void deleteNodeTopLeftByTripId(@Param("tripId") Long tripId);

    int updateBatchNodeBranchId(@Param("ids") List<Long> ids, @Param("branchId") Long branchId);

    void updateChildByPid(@Param("prevBranchNodeId") Long prevBranchNodeId);
}
